var userId = "120000111494497",
    powerEntity= {"allowCreateTopic":true,"allowDelComment":true,"allowDelInviteMg":true,"allowDelSpeak":true,
        "allowInviteMg":true,"allowMGBanned":true,"allowMGLive":true,"allowMGReward":true,"allowMGTopic":true,
        "allowMGTopicInvite":true,"allowReplyComment":true,"allowSearchReward":true,"allowSpeak":true,
        "allowTopicInvite":true,"liveId":"310000045145155","topicId":"270000274511169"},
    liveStatus = "beginning",
    liveFakeStatus = "beginning",
    liveId="310000045145155",
    topicId="270000274511169",
    isFocus="N",
    isLogIn="true",
    isAuthTopic = "Y",
    alertStatus = "N",
    isFollowedThird=Boolean("true"),
    topicType = "encrypt",
    currentUserRole="",
    createDate="",
    startDate="2017-03-15 10:00:00",
    startTime="1489543200000",
    qlsubscribe="1", // 1：已关注千聊
    isBindThird =Boolean(""),
    currentTimeMillis = "1493276526556",
    myName = "纪广财",
    myHead = "https://img.qlchat.com/qlLive/userHeadImg/74AC7FB1-3047-4096-822B-A24FC7F20502-0S0SU4JJF9.jpg",
    channelId = "",
    sid = "134A2228CCC18530885D2BEE58D13A22",
    shareKey = "",
    lshareKey = "",
    isAuditionOpen = "N",
    liveTopicInviteJsons = [{"createBy":"120000111494497","createTime":"2017-03-15 09:54:58","id":"270000274511173","name":"纪广财",
        "role":"topicCreater","sort":1,"title":"主持人","topicId":"270000274511169","updateTime":"",
        "userBackgroundImgUrl":"https://img.qlchat.com/qlLive/userHeadImg/74AC7FB1-3047-4096-822B-A24FC7F20502-0S0SU4JJF9.jpg","userId":"120000111494497"}],
    myShareKey = "",
    isShareAuth = "",
    joinType = "",
    currentUserId = "270000274511173",
    currentTitle = "主持人",
    likeLimit = "8",
    isShowQl = "Y",
    percentageRule = {businessOpProfit:'0%',isEnable:'N',platformProfit:'10%',userProfit:'99.40%'};

  var isrelay="N";
  var isRecording = false;

  if(startTime!=""){
    startTime = Number(startTime);
  }else{
    startTime = 1120752000000;
  }
  if(currentTimeMillis!=""){
    currentTimeMillis = Number(currentTimeMillis);
  }else{
    currentTimeMillis = new Date().getTime();
  }
  var relLoadBox = setTimeout(function(){
    document.getElementById("xes_btn_RelLoad_box").style.display = "block";
  },10000);

  $(function(){
    /*显示通告*/
    if(liveFakeStatus == "beginning" && startTime < 1464883200000){
      if($(".sNotice").length > 0){
        $(".sNotice").show();
      }
    };
  });



(function(a) {
    function b(a, b, c) {
        var d = document.createElement("source");
        d.src = c;
        d.type = "video/" + b;
        a.appendChild(d)
    }
    var c = /Android/ig.test(navigator.userAgent);
    /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
    var d = function() {
        c && (this.noSleepVideo = document.createElement("video"),
        this.noSleepVideo.setAttribute("loop", ""),
        b(this.noSleepVideo, "webm", "data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA="),
        b(this.noSleepVideo, "mp4", "data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAAG21kYXQAAAGzABAHAAABthADAowdbb9/AAAC6W1vb3YAAABsbXZoZAAAAAB8JbCAfCWwgAAAA+gAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIVdHJhawAAAFx0a2hkAAAAD3wlsIB8JbCAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAIAAAACAAAAAABsW1kaWEAAAAgbWRoZAAAAAB8JbCAfCWwgAAAA+gAAAAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAVxtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEcc3RibAAAALhzdHNkAAAAAAAAAAEAAACobXA0dgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAIAAgASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAAFJlc2RzAAAAAANEAAEABDwgEQAAAAADDUAAAAAABS0AAAGwAQAAAbWJEwAAAQAAAAEgAMSNiB9FAEQBFGMAAAGyTGF2YzUyLjg3LjQGAQIAAAAYc3R0cwAAAAAAAAABAAAAAQAAAAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAAEwAAAAEAAAAUc3RjbwAAAAAAAAABAAAALAAAAGB1ZHRhAAAAWG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAK2lsc3QAAAAjqXRvbwAAABtkYXRhAAAAAQAAAABMYXZmNTIuNzguMw=="));
        return this
    };
    d.prototype.enable = function(a) {
        c && this.noSleepVideo.play()
    }
    ;
    d.prototype.disable = function() {
        c && this.noSleepVideo.pause()
    }
    ;
    a.NoSleep = d
})(this);
var Base64 = {
    _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
    encode: function(a) {
        var b = "", c, d, e, f, h, g, l = 0;
        for (a = Base64._utf8_encode(a); l < a.length; )
            c = a.charCodeAt(l++),
            d = a.charCodeAt(l++),
            e = a.charCodeAt(l++),
            f = c >> 2,
            c = (c & 3) << 4 | d >> 4,
            h = (d & 15) << 2 | e >> 6,
            g = e & 63,
            isNaN(d) ? h = g = 64 : isNaN(e) && (g = 64),
            b = b + this._keyStr.charAt(f) + this._keyStr.charAt(c) + this._keyStr.charAt(h) + this._keyStr.charAt(g);
        return b
    },
    decode: function(a) {
        var b = "", c, d, e, f, h, g = 0;
        for (a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); g < a.length; )
            c = this._keyStr.indexOf(a.charAt(g++)),
            d = this._keyStr.indexOf(a.charAt(g++)),
            f = this._keyStr.indexOf(a.charAt(g++)),
            h = this._keyStr.indexOf(a.charAt(g++)),
            c = c << 2 | d >> 4,
            d = (d & 15) << 4 | f >> 2,
            e = (f & 3) << 6 | h,
            b += String.fromCharCode(c),
            64 != f && (b += String.fromCharCode(d)),
            64 != h && (b += String.fromCharCode(e));
        return b = Base64._utf8_decode(b)
    },
    _utf8_encode: function(a) {
        a = a.replace(/\r\n/g, "\n");
        for (var b = "", c = 0; c < a.length; c++) {
            var d = a.charCodeAt(c);
            128 > d ? b += String.fromCharCode(d) : (127 < d && 2048 > d ? b += String.fromCharCode(d >> 6 | 192) : (b += String.fromCharCode(d >> 12 | 224),
            b += String.fromCharCode(d >> 6 & 63 | 128)),
            b += String.fromCharCode(d & 63 | 128))
        }
        return b
    },
    _utf8_decode: function(a) {
        var b = "", c = 0, d;
        for (c1 = c2 = 0; c < a.length; )
            d = a.charCodeAt(c),
            128 > d ? (b += String.fromCharCode(d),
            c++) : 191 < d && 224 > d ? (c2 = a.charCodeAt(c + 1),
            b += String.fromCharCode((d & 31) << 6 | c2 & 63),
            c += 2) : (c2 = a.charCodeAt(c + 1),
            c3 = a.charCodeAt(c + 2),
            b += String.fromCharCode((d & 15) << 12 | (c2 & 63) << 6 | c3 & 63),
            c += 3);
        return b
    }
}
  , b64pad2 = "="
  , chrsz2 = 8;
function b64_hmac_sha1(a, b) {
    return binb2b64(core_hmac_sha1(a, b))
}
function core_sha1(a, b) {
    a[b >> 5] |= 128 << 24 - b % 32;
    a[(b + 64 >> 9 << 4) + 15] = b;
    b = Array(80);
    for (var c = 1732584193, d = -271733879, e = -1732584194, f = 271733878, h = -1009589776, g = 0; g < a.length; g += 16) {
        for (var l = c, k = d, p = e, r = f, w = h, m = 0; 80 > m; m++) {
            b[m] = 16 > m ? a[g + m] : rol(b[m - 3] ^ b[m - 8] ^ b[m - 14] ^ b[m - 16], 1);
            var x = safe_add2(safe_add2(rol(c, 5), sha1_ft(m, d, e, f)), safe_add2(safe_add2(h, b[m]), sha1_kt(m)))
              , h = f
              , f = e
              , e = rol(d, 30)
              , d = c
              , c = x
        }
        c = safe_add2(c, l);
        d = safe_add2(d, k);
        e = safe_add2(e, p);
        f = safe_add2(f, r);
        h = safe_add2(h, w)
    }
    return [c, d, e, f, h]
}
function sha1_ft(a, b, c, d) {
    return 20 > a ? b & c | ~b & d : 40 > a ? b ^ c ^ d : 60 > a ? b & c | b & d | c & d : b ^ c ^ d
}
function sha1_kt(a) {
    return 20 > a ? 1518500249 : 40 > a ? 1859775393 : 60 > a ? -1894007588 : -899497514
}
function core_hmac_sha1(a, b) {
    var c = str2binb(a);
    16 < c.length && (c = core_sha1(c, a.length * chrsz2));
    var d = Array(16);
    a = Array(16);
    for (var e = 0; 16 > e; e++)
        d[e] = c[e] ^ 909522486,
        a[e] = c[e] ^ 1549556828;
    b = core_sha1(d.concat(str2binb(b)), 512 + b.length * chrsz2);
    return core_sha1(a.concat(b), 672)
}
function safe_add2(a, b) {
    var c = (a & 65535) + (b & 65535);
    return (a >> 16) + (b >> 16) + (c >> 16) << 16 | c & 65535
}
function rol(a, b) {
    return a << b | a >>> 32 - b
}
function str2binb(a) {
    for (var b = [], c = (1 << chrsz2) - 1, d = 0; d < a.length * chrsz2; d += chrsz2)
        b[d >> 5] |= (a.charCodeAt(d / chrsz2) & c) << 32 - chrsz2 - d % 32;
    return b
}
function binb2b64(a) {
    for (var b = "", c = 0; c < 4 * a.length; c += 3)
        for (var d = (a[c >> 2] >> 8 * (3 - c % 4) & 255) << 16 | (a[c + 1 >> 2] >> 8 * (3 - (c + 1) % 4) & 255) << 8 | a[c + 2 >> 2] >> 8 * (3 - (c + 2) % 4) & 255, e = 0; 4 > e; e++)
            b = 8 * c + 6 * e > 32 * a.length ? b + b64pad2 : b + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d >> 6 * (3 - e) & 63);
    return b
}
function generateTimeStamp() {
    var a = new Date
      , a = a.getTime() + 6E4 * a.getTimezoneOffset();
    return (new Date(a)).ISODate()
}
function LZ(a) {
    return (0 > a || 9 < a ? "" : "0") + a
}
Date.prototype.ISODate = new Function("with (this)\n    return getFullYear()+'-'+LZ(getMonth()+1)+'-'+LZ(getDate())+'T'+LZ(getHours())+':'+LZ(getMinutes())+':'+LZ(getSeconds())+'.000Z'");
function URLEncode(a) {
    for (var b = "", c = 0; c < a.length; c++) {
        var d = a.charAt(c);
        if (" " == d)
            b += "+";
        else if (-1 != "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()".indexOf(d))
            b += d;
        else {
            var e = d.charCodeAt(0);
            255 < e ? (alert("Unicode Character '" + d + "' cannot be encoded using standard URL encoding.\n(URL encoding only supports 8-bit characters.)\nA space (+) will be substituted."),
            b += "+") : (b += "%",
            b += "0123456789ABCDEF".charAt(e >> 4 & 15),
            b += "0123456789ABCDEF".charAt(e & 15))
        }
    }
    return b
}
function URLDecode(a) {
    for (var b = "", c = 0; c < a.length; ) {
        var d = a.charAt(c);
        "+" == d ? (b += " ",
        c++) : "%" == d ? c < a.length - 2 && -1 != "0123456789ABCDEFabcdef".indexOf(a.charAt(c + 1)) && -1 != "0123456789ABCDEFabcdef".indexOf(a.charAt(c + 2)) ? (b += unescape(a.substr(c, 3)),
        c += 3) : (alert("Bad escape combination near ..." + a.substr(c)),
        b += "%[ERROR]",
        c++) : (b += d,
        c++)
    }
    return b
}
function querySt(a) {
    hu = window.location.search.substring(1);
    gy = hu.split("&");
    for (i = 0; i < gy.length; i++)
        if (ft = gy[i].split("="),
        ft[0] == a)
            return ft[1]
}
(function(a) {
    a.fn.extend({
        popBox: function(b) {
            b = a.extend({
                boxType: "",
                boxContent: "",
                topAlign: "center",
                topContent: "",
                btnType: "",
                confirmName: "\u786e\u5b9a",
                cancelName: "\u53d6\u6d88",
                textAlign: "center",
                isNeedBg: !0,
                confirmFunction: function() {},
                cancelFunction: function() {}
            }, b);
            var c = '<span><a href="javascript:;" class="pop_btn btn_confirm">' + b.confirmName + "</a></span>"
              , d = '<span><a href="javascript:;" class="pop_btn btn_cancel">' + b.cancelName + "</a></span>"
              , e = '<div class="popBox">';
            b.isNeedBg && (e += '<b class="pop_bg"></b>');
            e += '<div class="main">';
            "" != b.topContent && (e += '<div class="pop_top ',
            "left" == b.topAlign && (e += "alignLeft"),
            e += '"><span>' + b.topContent + "</span></div>");
            e += '<div class="pop_content';
            "left" == b.textAlign && (e += " alignLeft");
            e += '"><span></span></div><div class="pop_bottom"></div></div></div>';
            0 < a(".popBox").length && a(".popBox").remove();
            a(e).appendTo("body");
            a(".pop_content span").html(b.boxContent);
            a(".pop_bottom").removeClass("both");
            switch (b.btnType) {
            case "confirm":
                a(".pop_bottom").html(c);
                break;
            case "cancel":
                a(".pop_bottom").html(d);
                break;
            case "both":
                a(".pop_bottom").addClass("both");
                a(".pop_bottom").html(d + c);
                break;
            case "tran":
                a(".pop_bottom").addClass("both");
                a(".pop_bottom").html(c + d);
                break;
            default:
                a(".pop_bottom").html("")
            }
            a(document).off("click", ".btn_cancel").on("click", ".btn_cancel", function() {
                b.cancelFunction();
                a(".popBox").hide()
            }).on("click", ".pop_bg", function() {
                a(".popBox").hide()
            }).off("click", ".btn_confirm").on("click", ".btn_confirm", function() {
                b.confirmFunction();
                a(".popBox").hide()
            })
        }
    })
})(jQuery);
function getQueryString(a) {
    a = new RegExp("(^|&)" + a + "=([^&]*)(&|$)","i");
    a = window.location.search.substr(1).match(a);
    return null != a ? unescape(a[2]) : null
}
(function(a) {
    a.fn.extend({
        switchBtn: function(b) {
            b = a.extend({
                obj: "",
                switchType: "simple",
                functionafter: "N",
                isOn: "Y",
                isNormalStyle: "N",
                switchHeight: "3rem",
                switchWidth: "6rem",
                switchOnColor: "#00acff",
                switchOffColor: "#ccc",
                onName: "",
                offName: "",
                selectstyle: "swon",
                styleFunction: function() {},
                onFunction: function() {},
                offFunction: function() {}
            }, b);
            var c = b.obj
              , d = b.selectstyle;
            if ("Y" == b.isNormalStyle) {
                var e = '<style type="text/css" id="switchStyle">.switch_btn{display: block;width:' + b.switchWidth + ";border-radius:" + b.switchHeight + ";background-color: " + b.switchOffColor + ";color: #fff;position: relative;overflow:hidden;cursor:pointer;}.switch_btn." + d + "{background-color: " + b.switchOnColor + ";}.switch_btn .switch_child{display:inline-block;width:" + b.switchHeight + ";height:" + b.switchHeight + ";border-radius:" + b.switchHeight + ";border:1px solid " + b.switchOffColor + ";background-color: #fff;float: left;}.switch_btn .switch_text{display:inline-block;color:#fff;float: right;margin-right:10px;line-height:" + b.switchHeight + ";}.switch_btn." + d + " .switch_child{border:1px solid " + b.switchOnColor + ";float: right;}.switch_btn." + d + " .switch_text{float: left;margin-left:10px;}</style>";
                0 >= a("#switchStyle").length && a("head").append(e);
                e = '<i class="switch_child"></i><var class="switch_text">';
                "" == b.isOn || "Y" == b.isOn ? e += b.onName : "N" == b.isOn && (e += b.offName);
                e += "</var>"
            } else
                "" != b.onName && "" != b.offName && (e = '<var class="switch_Name">');
            "" == b.isOn || "Y" == b.isOn ? a(b.obj).addClass(d) : "N" == b.isOn && a(b.obj).removeClass(d);
            b.styleFunction = function() {
                "N" == b.isOn ? (a(c).removeClass(d),
                a(c).find(".switch_text").html(b.offName)) : "Y" == b.isOn && (a(c).addClass(d),
                a(c).find(".switch_text").html(b.onName))
            }
            ;
            0 < a(c).length && ("Y" == b.isNormalStyle ? (a(c).addClass("switch_btn"),
            a(c).append(e)) : "" != b.onName && "" != b.offName && a(c).append(e),
            a(document).on("click", c, function() {
                b.isOn = "N" == b.isOn ? "Y" : "N";
                if ("complex" == b.switchType) {
                    if ("N" == b.isOn)
                        b.offFunction();
                    else
                        b.onFunction();
                    "N" == b.functionafter && b.styleFunction()
                } else
                    "simple" == b.switchType && b.styleFunction()
            }))
        }
    })
})(jQuery);
(function(a) {
    a.fn.extend({
        minTipsBox: function(b) {
            b = a.extend({
                tipsContent: "",
                tipsTime: 2,
                position: "middle"
            }, b);
            var c = 1E3 * parseFloat(b.tipsTime)
              , d = b.position;
            0 < a(".min_tips_box").length && a(".min_tips_box").remove();
            a('<div class="min_tips_box"><b class="bg"></b><span class="tips_content"></span></div>').appendTo("body");
            a(".min_tips_box .tips_content").html(b.tipsContent);
            a(".min_tips_box").addClass(d);
            setTimeout(function() {
                a(".min_tips_box").hide()
            }, c)
        }
    })
})(jQuery);
var STS = {}, OSSW;
window.OSS && (OSSW = OSS.Wrapper,
STS = OSS.STS);
(function() {
    function a(a, b, c) {
        if (a.addEventListener)
            a.addEventListener(b, c, !1);
        else if (a.attachEvent)
            a.attachEvent("on" + b, function() {
                c.call(a)
            });
        else
            throw Error("not supported or DOM not loaded");
    }
    function b(a, b) {
        for (var c in b)
            b.hasOwnProperty(c) && (a.style[c] = b[c])
    }
    function c(a) {
        return -1 !== a.indexOf(".") ? a.replace(/.*[.]/, "") : ""
    }
    function d(a, b) {
        return a.currentStyle ? a.currentStyle[b] : window.getComputedStyle ? (propprop = b.replace(/([A-Z])/g, "-$1"),
        propprop = b.toLowerCase(),
        document.defaultView.getComputedStyle(a, null)[b]) : null
    }
    function e() {
        for (var a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""), b = "", c = 0; 8 > c; c++)
            var d = Math.ceil(35 * Math.random())
              , b = b + a[d];
        b += "-";
        for (c = 0; 4 > c; c++)
            d = Math.ceil(35 * Math.random()),
            b += a[d];
        b += "-";
        for (c = 0; 4 > c; c++)
            d = Math.ceil(35 * Math.random()),
            b += a[d];
        b += "-" + (new Date).getTime() + "-";
        for (c = 0; 12 > c; c++)
            d = Math.ceil(35 * Math.random()),
            b += a[d];
        return b
    }
    var f = 31457280;
    window.imgUpload = function(b, c, e) {
        this._settings = {
            project: "qlLive",
            folder: "temp",
            autoSubmit: !0,
            responseType: !1,
            multiple: "N",
            isCancelSend: !1,
            quota: 100,
            maxLength: 100,
            onChange: function() {
                $(".loadingBox").show()
            },
            onComplete: function(a, b) {},
            onError: function() {},
            onAllComplete: function() {},
            isPass: function() {
                return !0
            },
            uploadType: function() {
                return "pic"
            },
            progress: function(a) {}
        };
        this.fileArray = [];
        for (var f in c)
            c.hasOwnProperty(f) && (this._settings[f] = c[f]);
        if (b.jquery)
            b = b[0];
        else if ("string" == typeof b)
            /^#.*/.test(b) && (b = b.slice(1)),
            b = document.getElementById(b);
        else if (b instanceof Blob) {
            this.blobSrc(b);
            return
        }
        if (!b || 1 !== b.nodeType)
            throw Error("Please make sure that you're passing a valid element");
        "A" == b.nodeName.toUpperCase() && a(b, "click", function(a) {
            a && a.preventDefault ? a.preventDefault() : window.event && (window.event.returnValue = !1)
        });
        "mp3" === this._settings.uploadType() && (this._audio = document.createElement("audio"),
        this._audio.setAttribute("class", "getAudioTime"),
        this._audio.setAttribute("preload", "auto"),
        this._audio.volume = 0,
        document.body.appendChild(this._audio));
        this._upObj = e;
        "CANVAS" == b.tagName && this.canvasImg(b);
        "AUDIOUP" == b.tagName ? this.audioUp() : (b.style.overflow = "hidden",
        "static" == d(b, "position") && (b.style.position = "relative"),
        this._button = b,
        this._input = null,
        this.createInput())
    }
    ;
    imgUpload.prototype = {
        fileName: "",
        createInput: function() {
            var d = this
              , e = document.createElement("input");
            e.setAttribute("type", "file");
            e.setAttribute("onmousedown", "return false");
            e.setAttribute("name", "file");
            e.setAttribute("id", "file");
            var f = d._settings.uploadType()
              , k = String("image" + decodeURIComponent("%2F") + "jpg,image" + decodeURIComponent("%2F") + "jpeg,image" + decodeURIComponent("%2F") + "png,image" + decodeURIComponent("%2F") + "gif,image" + decodeURIComponent("%2F") + "bmp")
              , p = String("audio" + decodeURIComponent("%2F") + "*");
            "pic" == f ? e.setAttribute("accept", k) : "mp3" == f && e.setAttribute("accept", p);
            "Y" == d._settings.multiple && e.setAttribute("multiple", "multiple");
            b(e, {
                position: "absolute",
                right: 0,
                bottom: 0,
                opacity: 0,
                margin: 0,
                padding: 0,
                fontSize: "480px",
                cursor: "pointer",
                "z-index": "10",
                filter: "alpha(opacity=0)"
            });
            a(e, "change", function() {
                if (e && "" !== e.value) {
                    if ("Y" == d._settings.multiple && e.files.length > d._settings.maxLength)
                        return $(this).popBox({
                            topContent: "\u8d85\u8fc7\u6570\u91cf\u9650\u5236",
                            boxContent: "\u6700\u591a\u9009\u62e9" + d._settings.quota + "\u5f20\u56fe\u7247",
                            btnType: "confirm",
                            confirmFunction: function() {
                                return !1
                            }
                        }),
                        d.clearInputVal(),
                        !1;
                    var a = e.value.replace(/.*(\/|\\)/, "")
                      , b = c(a);
                    for (i = 0; i < d._input.files.length; i++) {
                        b = d._input.files[i].type.replace("audio/mpeg", "mp3").replace(/(image|audio)\//, "") || c(d._input.files[i].name);
                        if (!("pic" !== d._settings.uploadType() || a && /(jpg|JPG|png|PNG|gif|GIF|bmp|BMP|jpeg|JPEG)$/.test(b)))
                            return $(this).popBox({
                                topContent: "\u683c\u5f0f\u9519\u8bef",
                                boxContent: "\u53ea\u652f\u6301jpg|JPG|png|PNG|gif|GIF|bmp\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01",
                                btnType: "confirm",
                                confirmFunction: function() {
                                    return !1
                                }
                            }),
                            !1;
                        if (!("mp3" !== d._settings.uploadType() || a && /(mp3|MP3)/.test(b)))
                            return $(this).popBox({
                                topContent: "\u683c\u5f0f\u9519\u8bef",
                                boxContent: "\u53ea\u652f\u6301MP3\u6587\u4ef6\u4e0a\u4f20\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01",
                                btnType: "both",
                                confirmName: "\u91cd\u65b0\u9009\u62e9",
                                cancelName: "\u53d6\u6d88",
                                confirmFunction: function() {
                                    $(d._input).click()
                                }
                            }),
                            !1;
                        b = c(d._input.files[i].name);
                        if (!("doc" !== d._settings.uploadType() || a && /^(doc|xls|pdf|docx|xlsx)$/.test(b)))
                            return $(this).popBox({
                                topContent: "\u683c\u5f0f\u9519\u8bef",
                                boxContent: "\u53ea\u652f\u6301doc,pdf,xls\u6587\u4ef6\u4e0a\u4f20\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01",
                                btnType: "both",
                                confirmName: "\u91cd\u65b0\u9009\u62e9",
                                cancelName: "\u53d6\u6d88",
                                confirmFunction: function() {
                                    $(d._input).click()
                                }
                            }),
                            !1
                    }
                    d._settings.autoSubmit && d._settings.isPass() && (d._settings.onChange(),
                    d.submit())
                }
            });
            this._button.appendChild(e);
            this._input = e
        },
        canvasImg: function(a) {
            a = dataURLtoBlob(a.toDataURL("image/jpeg"));
            this.send2OSS(a)
        },
        blobSrc: function(a) {
            this.send2OSS(a)
        },
        audioUp: function() {
            this.send2OSS(this._upObj)
        },
        clearInputVal: function() {
            var a = this._input;
            a.parentNode.removeChild(a);
            this._input = null;
            this.createInput()
        },
        submit: function() {
            if (1 < this._input.files.length)
                for (i = 1; i < this._input.files.length; i++)
                    this.fileArray[i - 1] = this._input.files[i];
            this.send2OSS(this._input.files[0]);
            this.clearInputVal()
        },
        uploadElseFile: function() {
            this.send2OSS(this.fileArray.shift())
        },
        uploadFile: function(a, b, c, d, p, r) {
            var g = this
              , h = d
              , l = !1;
            new FormData;
            var k, n, t, u = "ql-res";
            "doc" === g._settings.uploadType() && (u = "qianliao-doc-download-402-301");
            /(https)/.test(window.location.href) && (l = !0);
            var y = new OSSW({
                region: "oss-cn-hangzhou",
                accessKeyId: a,
                secure: l,
                accessKeySecret: b,
                stsToken: c,
                bucket: u
            });
            g._settings.isCancelSend = !1;
            var v = function(a) {
                y.multipartUpload(k, h, {
                    checkpoint: t,
                    progress: function(a, b) {
                        return function(c) {
                            if (g._settings.isCancelSend)
                                return !1;
                            void 0 !== b && (t = b,
                            g._settings.progress(a));
                            c()
                        }
                    }
                }).then(function(c) {
                    $(".loadingBox").hide();
                    if (!g._settings.isCancelSend) {
                        if ("doc" === g._settings.uploadType())
                            g._settings.onComplete(imgLoadUrl, n, d.name);
                        else
                            g._settings.onComplete(imgLoadUrl, a);
                        if (0 < g.fileArray.length)
                            g.uploadElseFile();
                        else
                            g._settings.onAllComplete()
                    }
                    clearInterval(b)
                }).catch(function(a) {
                    console.log(a);
                    clearInterval(b)
                });
                var b = setInterval(function() {
                    g._settings.isCancelSend && (clearInterval(b),
                    g._settings.onError())
                }, 1500)
            };
            n = p;
            k = this._settings.project + "/" + this._settings.folder + "/" + e() + "." + n;
            if (/^(jpg|JPG|png|PNG|gif|GIF|bmp|BMP|jpeg|JPEG)$/.test(n)) {
                if (f = 5242880,
                imgLoadUrl = "http://img.qlchat.com/" + k,
                isiOS() || "Chrome" == checkBrowser())
                    f = 3145728
            } else
                "doc" === g._settings.uploadType() ? (f = 20971520,
                imgLoadUrl = "http://docs.qianliaowang.com/" + k) : (f = 31457280,
                imgLoadUrl = "http://media.qlchat.com/" + k,
                /^(mp3|MP3)$/.test(n) && (imgLoadUrl = "http://media.qianliaowang.com/" + k));
            imgLoadUrl = imgLoadUrl.replace("http://", "https://");
            if (d.size > f && "pic" === g._settings.uploadType())
                if (isiOS() || "Chrome" == checkBrowser()) {
                    a = null;
                    void 0 != window.createObjectURL ? a = window.createObjectURL(h) : void 0 != window.URL ? a = window.URL.createObjectURL(h) : void 0 != window.webkitURL && (a = window.webkitURL.createObjectURL(h));
                    var q = new Image;
                    q.onload = function() {
                        var a = q.width
                          , b = q.height
                          , c = a / b;
                        1600 < a && (a = 1600,
                        b = parseInt(a / c));
                        1 > $("#canvasTemp").length && (c = document.createElement("canvas"),
                        c.setAttribute("id", "canvasTemp"),
                        c.style.display = "none",
                        $("body").append(c));
                        var d = $("#canvasTemp")
                          , c = d[0].getContext("2d");
                        d.attr({
                            width: a,
                            height: b
                        });
                        c.drawImage(q, 0, 0, a, b);
                        setTimeout(function() {
                            base64 = d[0].toDataURL("image/jpeg", 1);
                            h = dataURLtoBlob(base64);
                            h = new File([h],"filename.jpg");
                            v()
                        }, 1E3)
                    }
                    ;
                    q.src = a
                } else
                    return $(document).popBox({
                        boxTitle: "\u6e29\u99a8\u63d0\u793a",
                        boxContent: "\u8bf7\u9009\u62e9\u5c0f\u4e8e5M\u7684\u56fe\u7247",
                        btnType: "confirm",
                        confirmFunction: function() {
                            return !1
                        }
                    }),
                    g._settings.onError(),
                    !1;
            else {
                if (d.size > f && "doc" === g._settings.uploadType())
                    return $(document).popBox({
                        boxTitle: "\u6587\u4ef6\u8fc7\u5927",
                        boxContent: "\u6587\u4ef6\u5fc5\u987b\u5c0f\u4e8e20M\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9~\t",
                        btnType: "both",
                        confirmName: "\u91cd\u65b0\u9009\u62e9",
                        cancelName: "\u53d6\u6d88",
                        confirmFunction: function() {
                            $(g._input).click()
                        }
                    }),
                    g._settings.onError(),
                    !1;
                if (d.size > f && /(mp3)/.test(n))
                    return $(document).popBox({
                        boxTitle: "\u6587\u4ef6\u8fc7\u5927",
                        boxContent: "\u6587\u4ef6\u5fc5\u987b\u5c0f\u4e8e30M\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9~\t",
                        btnType: "both",
                        confirmName: "\u91cd\u65b0\u9009\u62e9",
                        cancelName: "\u53d6\u6d88",
                        confirmFunction: function() {
                            $(g._input).click()
                        }
                    }),
                    g._settings.onError(),
                    !1;
                "wav" == n && (n = "audio/wav");
                v(r)
            }
        },
        send2OSS: function(a) {
            var b = this
              , d = a.type || c(a.name) || ""
              , e = {}
              , f = "jpg";
            "doc" !== b._settings.uploadType() ? (f = d.replace("audio/mpeg", "mp3").replace(/(image|audio)\//, "").replace(/(jpeg)/, "jpg"),
            a.name && /(wav)/.test(a.name) && (f = "wav"),
            "mp3" != b._settings.uploadType() || /(mp3|wav)/.test(f) || (f = "mp3")) : (f = c(a.name),
            e = {
                fuck: "me"
            });
            if ("canvas" === f || "blob" === f)
                f = "jpeg";
            $.ajax({
                type: "POST",
                url: "/live/stsauth.htm",
                data: e,
                success: function(c) {
                    var d = c.data;
                    "200" == c.state.code ? "mp3" !== b._settings.uploadType() ? b.uploadFile(d.accessKeyId, d.accessKeySecret, d.securityToken, a, f) : (c = URL.createObjectURL(a),
                    b._audio.setAttribute("src", c),
                    b._audio.play(),
                    setTimeout(function() {
                        b._audio.pause();
                        var c = b._audio.duration.toFixed(0);
                        b.uploadFile(d.accessKeyId, d.accessKeySecret, d.securityToken, a, f, c)
                    }, 700)) : "400" == c.state.code ? $(document).popBox({
                        boxContent: d.msg,
                        btnType: "confirm"
                    }) : ($(document).popBox({
                        boxContent: "\u5bf9\u4e0d\u8d77\uff0c\u60a8\u5c1a\u672a\u767b\u9646\u6216\u8005\u8d85\u65f6\uff0c\u8bf7\u91cd\u65b0\u767b\u9646!",
                        btnType: "confirm"
                    }),
                    b._settings.onError())
                },
                error: function() {
                    b.uploadFailed();
                    b._settings.onError()
                }
            })
        },
        uploadFailed: function() {
            $(document).popBox({
                boxContent: "\u7f51\u7edc\u5f02\u5e38,\u8bf7\u68c0\u67e5\u7f51\u7edc",
                btnType: "confirm"
            });
            $(".loadingBox").hide();
            this._settings.onError()
        }
    }
})();
function dataURLtoBlob(a) {
    var b = a.split(",");
    a = b[0].match(/:(.*?);/)[1];
    for (var b = atob(b[1]), c = b.length, d = new Uint8Array(c); c--; )
        d[c] = b.charCodeAt(c);
    return new Blob([d],{
        type: a
    })
}
function readBlobAsDataURL(a, b) {
    var c = new FileReader;
    c.onload = function(a) {
        b(a.target.result)
    }
    ;
    c.readAsDataURL(a)
}
function checkBrowser() {
    var a = navigator.userAgent.toLowerCase();
    return strBrowser = /msie/i.test(a) && !/opera/.test(a) ? "IE: " + a.match(/msie ([\d.]+)/)[1] : /firefox/i.test(a) ? "Firefox: " + a.match(/firefox\/([\d.]+)/)[1] : /chrome/i.test(a) && /webkit/i.test(a) && /mozilla/i.test(a) ? "Chrome" : /opera/i.test(a) ? "Opera: " + a.match(/opera.([\d.]+)/)[1] : !/webkit/i.test(a) || /chrome/i.test(a) && /webkit/i.test(a) && /mozilla/i.test(a) ? "unKnow" : "Safari: "
}
function isAndroid() {
    var a = navigator.userAgent;
    return -1 < a.indexOf("Android") || -1 < a.indexOf("Linux")
}
function isiOS() {
    return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
}
function isWeixin() {
    return "micromessenger" == navigator.userAgent.toLowerCase().match(/MicroMessenger/i)
}
function isChrome() {
    return !!window.chrome
}
function refreshPage() {
    try {
        if (sessionStorage.getItem("isDataChange_B")) {
            var a = sessionStorage.getItem("isDataChange_B");
            sessionStorage.setItem("isDataChange_B", ++a)
        }
    } catch (b) {}
}
function normalFilter(a) {
    a = a.replace(/(\u0085)|(\u2028)|(\u2029)/g, "");
    a = a.replace(/\%/g, "%25");
    a = a.replace(/\+/g, "%2B");
    a = a.replace(/\#/g, "%23");
    a = a.replace(/\//g, "%2F");
    a = a.replace(/\?/g, "%3F");
    a = a.replace(/\=/g, "%3D");
    a = a.replace(/\</g, "&lt;");
    a = a.replace(/\>/g, "&gt;");
    return a = a.replace(/\&/g, "%26")
}
function symbolFilter(a) {
    a = a.replace(/\n|\r|(\r\n)|(\u0085)|(\u2028)|(\u2029)/g, "");
    return a = normalFilter(a)
}
function firstFilter(a) {
    a = a.replace(/\"/g, "&quot;");
    a = a.replace(/\'/g, "&#39;");
    return a = a.replace(/\\/g, "\\\\")
}
function wordFilter(a) {
    a = a.replace(/\</g, "&lt;");
    a = a.replace(/\>/g, "&gt;");
    a = a.replace(/\"/g, "&quot;");
    return a = a.replace(/\'/g, "&#39;")
}
function symbolDecode(a) {
    a = a.replace(/(\&lt;)/g, "<");
    a = a.replace(/(\&gt;)/g, ">");
    a = a.replace(/(\&quot;)/g, '"');
    a = a.replace(/(\&\#39;)/g, "'");
    return a = a.replace(/(\&amp;)/g, "&")
}
function postBackFilter(a) {
    return a.replace(/(\%26lt;br\%26gt;)/g, "<br>")
}
function checkTime(a) {
    10 > a && (a = "0" + a);
    return a
}
function pageLoadCommon(a, b, c) {
    a.scroll(function() {
        distanceScrollCount = a[0].scrollHeight;
        distanceScroll = a[0].scrollTop;
        topicPageHight = a.height();
        var d = distanceScrollCount - distanceScroll - topicPageHight
          , e = 3;
        c && (e = c);
        d < e && b()
    })
}
function qlSlBoxShow(a) {
    $(a).show();
    setTimeout(function() {
        var b = $(a).find(".main").outerHeight();
        b <= document.body.clientHeight - 45 ? ($(a).removeClass("qMS"),
        $(a).find(".main").css({
            marginTop: "-" + (b / 2 + 15).toFixed(0) + "px"
        }),
        0 < $(".qlMTBg").length && $(".qlMTBg").css({
            height: "100%"
        })) : ($(a).addClass("qMS"),
        $(a).find(".main").css({
            marginTop: "0px"
        }),
        0 < $(".qlMTBg").length && $(".qlMTBg").css({
            height: b + 30 + "px"
        }))
    }, 300)
}
function stopDrop(a) {
    $(a).each(function(a, c) {
        var b;
        $("body").off().on("touchstart.stop", function(a) {
            b = a.originalEvent.changedTouches[0].clientY
        });
        $("body").on("touchmove.stop", function(a) {
            var d = a.originalEvent.changedTouches[0].clientY
              , e = $(c).scrollTop();
            if (d > b && 5 > e)
                return a.preventDefault(),
                !1;
            b = d
        })
    })
}
function getCookie(a) {
    return 0 < document.cookie.length && (c_start = document.cookie.indexOf(a + "="),
    -1 != c_start) ? (c_start = c_start + a.length + 1,
    c_end = document.cookie.indexOf(";", c_start),
    -1 == c_end && (c_end = document.cookie.length),
    unescape(document.cookie.substring(c_start, c_end))) : ""
}
function setCookie(a, b, c) {
    var d = new Date;
    d.setDate(d.getDate() + c);
    document.cookie = a + "=" + escape(b) + (null == c ? "" : ";expires=" + d.toGMTString()) + ";path=/"
}
function delCookie(a) {
    var b = new Date;
    b.setTime(b.getTime() - 1);
    var c = getCookie(a);
    null != c && (document.cookie = a + "=" + c + ";expires=999; path=/",
    document.cookie = a + "=" + c + ";expires=" + b.toGMTString() + "; path=/")
}
var lastVisit = {};
try {
    localStorage.getItem("lastVisit") && (lastVisit = JSON.parse(localStorage.lastVisit))
} catch (a) {}
function rememberLastReaded(a, b) {
    var c = {};
    c.speakTime = a;
    c.speakId = b;
    lastVisit[topicId] = c;
    localStorage.setItem("lastVisit", JSON.stringify(lastVisit))
}
var newPointList = {};
function cheakNewPoint() {
    try {
        localStorage.getItem("newPointList") && (newPointList = JSON.parse(localStorage.newPointList))
    } catch (b) {}
    var a = {
        red: "#f14a4e",
        green: "#00c8bc",
        yellow: "#ffa200",
        blue: "#00acff"
    };
    0 < $(".badge").length && $(".badge").each(function() {
        if (newPointList[$(this).attr("attr-npval")])
            $(this).find(".newPoint").remove(),
            $(this).removeClass("badge");
        else {
            var b = $(this).attr("data-badge-content") || ""
              , c = $(this).attr("data-badge-top") || "-1"
              , d = $(this).attr("data-badge-left") || "-1"
              , e = $(this).attr("data-badge-color")
              , b = '<span class="newPoint" style="top:' + c + "rem;margin-left:" + d + "rem;background:" + (a[e] || "#f14a4e") + '">' + b + "</span>";
            $(this).prepend(b)
        }
    })
}
var shareCardList = {};
try {
    localStorage.getItem("shareCardList") && (shareCardList = JSON.parse(localStorage.shareCardList))
} catch (a) {}
function setShareCard(a, b) {
    shareCardList[a] = b;
    localStorage.setItem("shareCardList", JSON.stringify(shareCardList))
}
function getShareCard(a) {
    return shareCardList[a] || -1
}
var noticeClosedList = {};
function noticeClosedCheck() {
    try {
        localStorage.getItem("noticeClosedList") && (noticeClosedList = JSON.parse(localStorage.noticeClosedList))
    } catch (a) {}
    0 < $(".ql_notice_rem").length && $(".ql_notice_rem").each(function() {
        noticeClosedList[$(this).attr("attr-notice")] && $(this).hide()
    })
}
function getFocusQrFunction(a, b, c, d, e, f, h) {
    void 0 == e && (e = "");
    var g = "N";
    /.*recommend.*/.test(sessionStorage.getItem("trace_page")) && (g = "Y");
    $.ajax({
        type: "POST",
        url: "/live/getQr.htm",
        data: {
            channel: b,
            topicId: c,
            liveId: d,
            toUserId: e,
            channelId: h,
            showQl: g
        },
        success: function(b) {
            "200" == b.statusCode ? $(a).find("img").attr("src", b.msg) : $(a).find("img").attr("src", "//open.weixin.qq.com/qr/code/?username=qianliaoEdu");
            void 0 != f && "" != f && f()
        },
        error: function(a) {}
    })
}
var isSFing = !0;
function followLive(a, b, c, d) {
    var e = {
        cancleFlag: a,
        liveId: liveId
    };
    "undefined" != typeof b && "" != b && (e.topicId = b);
    "undefined" != typeof d && "" != d && (e.liveId = d);
    isSFing && (isSFing = !1,
    $(".loadingBox").show(),
    $.ajax({
        type: "POST",
        url: "/live/savefocus.htm",
        data: e,
        success: function(b) {
            isSFing = !0;
            $(".loadingBox").hide();
            "200" == b.statusCode ? (void 0 != c && "" != c && c(),
            _qla && _qla("event", {
                category: "followLive",
                action: "success",
                cancleFlag: a
            })) : ($(document).minTipsBox({
                tipsContent: b.msg,
                tipsTime: 1
            }),
            _qla && _qla("event", {
                category: "followLive",
                action: "failed",
                cancleFlag: a
            }))
        },
        error: function() {
            isSFing = !0;
            $(".loadingBox").hide();
            _qla && _qla("event", {
                category: "followLive",
                action: "failed",
                cancleFlag: a
            })
        }
    }))
}
function updateAlert(a, b, c, d) {
    a = {
        status: a,
        liveId: liveId
    };
    "undefined" != typeof b && "" != b && (a.liveId = b);
    isSFing && $.ajax({
        type: "POST",
        url: "/live/updateAlert.htm",
        data: a,
        success: function(a) {
            "200" == a.state.code ? (isSFing = !0,
            $(document).minTipsBox({
                tipsContent: a.state.msg,
                tipsTime: 1
            }),
            "function" == typeof c && c()) : $(document).minTipsBox({
                tipsContent: a.state.msg,
                tipsTime: 1
            })
        },
        error: function(a) {
            isSFing = !0;
            "function" == typeof d && ($(document).minTipsBox({
                tipsContent: a.state.msg,
                tipsTime: 1
            }),
            d())
        }
    })
}
function joinTopic(a, b, c, d) {
    a = {
        shareKey: a
    };
    isSFing && $.ajax({
        type: "POST",
        url: "/live/jointopic/" + b + ".htm",
        data: a,
        success: function(a) {
            "200" == a.statusCode ? (isSFing = !0,
            $(document).minTipsBox({
                tipsContent: a.msg,
                tipsTime: 1
            }),
            "function" == typeof c && c(),
            _qla && _qla("event", {
                category: "jointopic",
                action: "success"
            })) : ($(document).minTipsBox({
                tipsContent: a.msg,
                tipsTime: 1
            }),
            _qla && _qla("event", {
                category: "jointopic",
                action: "failed"
            }))
        },
        error: function(a) {
            isSFing = !0;
            "function" == typeof d && ($(document).minTipsBox({
                tipsContent: a.msg,
                tipsTime: 1
            }),
            d());
            _qla && _qla("event", {
                category: "jointopic",
                action: "failed"
            })
        }
    })
}
var sharePercent = {};
try {
    localStorage.getItem("sharePercent") && (sharePercent = JSON.parse(localStorage.sharePercent))
} catch (a) {}
function setSharePercent(a, b) {
    sharePercent[a] = b;
    localStorage.setItem("sharePercent", JSON.stringify(sharePercent))
}
function getSharePercent(a) {
    return sharePercent[a] || -1
}
function shareLinkReplace(a) {
    return a.replace(/((http|https):\/\/m\.qlchat\.com)/, "http://v" + (9 * Math.random()).toFixed(0) + ".qianliao.tv")
}
function wechatShareInit(a, b, c, d, e, f, h) {
    function g() {
        "undefined" != typeof isInvite && window.location.reload(!0)
    }
    function l() {}
    d = shareLinkReplace(d);
    a = {
        title: symbolDecode(a),
        desc: symbolDecode(c),
        link: d,
        imgUrl: e,
        success: f || g,
        cancel: h || l
    };
    c = {};
    for (item in a)
        c[item] = a[item];
    c.title = symbolDecode(b);
    wx.onMenuShareAppMessage(a);
    wx.onMenuShareTimeline(c);
    wx.onMenuShareQQ(a);
    wx.onMenuShareWeibo(a);
    wx.onMenuShareQZone(a);
    wx.showOptionMenu()
}
function alertMsg(a, b, c) {
    $(document).minTipsBox({
        tipsContent: a || "",
        tipsTime: b || 2,
        position: c || "middle"
    })
}
var isSendQuickAjax = !1;
function quickAjax(a, b, c, d, e, f) {
    isSendQuickAjax || (isSendQuickAjax = !0,
    $(".loadingBox").show(),
    $.ajax({
        type: a,
        url: b,
        data: c,
        success: function(a) {
            $(".loadingBox").hide();
            isSendQuickAjax = !1;
            console.log(a);
            alertMsg(a.msg);
            "200" == a.statusCode ? void 0 !== d && "function" === typeof d && d() : void 0 !== f && "function" === typeof f && f()
        },
        error: function(a) {
            isSendQuickAjax = !1;
            alertMsg(a.msg);
            void 0 !== e && "function" === typeof e && e()
        }
    }))
}
var validMsg = {
    voidString: "\u8f93\u5165\u4e0d\u80fd\u4e3a\u7a7a",
    notAPositiveNumber: "\u8bf7\u8f93\u5165\u6b63\u6574\u6570",
    notDecimal: "\u8bf7\u8f93\u5165\u4e24\u4f4d\u5c0f\u6570\u7684\u975e\u8d1f\u6570",
    lessOrMoreThanNum: function(a, b) {
        return "\u8bf7\u8f93\u5165" + a + "-" + b + "\u7684\u6570"
    },
    moreThanMax: function(a) {
        return "\u8bf7\u8f93\u5165\u5c0f\u4e8e\u7b49\u4e8e" + a + "\u7684\u6570"
    }
};
function isNumberValid(a, b, c, d) {
    if ("" === a)
        return alertMsg(d + ": " + validMsg.voidString, 1.5),
        !1;
    if (/^[1-9]+[0-9]*]*$/.test(a) || "0" === a)
        return b && c && (Number(a) < b || Number(a) > c) ? (alertMsg(d + ": " + validMsg.lessOrMoreThanNum(b, c, 1.5)),
        !1) : !0;
    alertMsg(d + ": " + validMsg.notAPositiveNumber, 1.5);
    return !1
}
function isDecimalValid(a, b, c, d) {
    return "" === a ? (alertMsg(d + ": " + validMsg.voidString, 1.5),
    !1) : /^[0-9]+([.]\d{1,2})?$/.test(a) ? b && c && (a < b || a > c) ? (alertMsg(d + ": " + validMsg.lessOrMoreThanNum(b, c, 1.5)),
    !1) : !0 : (alertMsg(d + ": " + validMsg.notDecimal, 1.5),
    !1)
}
function validLegal(a, b, c, d, e, f) {
    function h() {
        var a = "";
        if (/(^[0-9]*[\.]?[0-9]{0,2}$)/.test(c))
            return d && Number(c) > d ? (f && "" != f && (a += "\uff0c" + f),
            alertMsg(b + "\u4e0d\u80fd\u8d85\u8fc7" + d + "\u5143" + a),
            !1) : e && Number(c) < e ? (f && "" != f && (a += "\uff0c" + f),
            alertMsg(b + "\u4e0d\u80fd\u5c0f\u4e8e" + e + "\u5143" + a),
            !1) : !0;
        alertMsg(b + "\u5fc5\u987b\u4e3a\u975e\u8d1f\u6570\u5b57,\u6700\u591a2\u4f4d\u5c0f\u6570");
        return !1
    }
    function g() {
        if (/(^[a-zA-Z]+$)|(^[\u4e00-\u9fa5]+$)/.test(c))
            return d && c.length > d ? (alertMsg(b + "\u4e0d\u80fd\u8d85\u8fc7" + d + "\u4e2a\u5b57"),
            !1) : !0;
        alertMsg("\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d");
        return !1
    }
    function l() {
        if (/^[0-9a-zA-Z]+$/.test(c))
            return d && c.length > d ? (alertMsg(b + "\u6700\u957f\u4e3a" + d + "\u4f4d"),
            !1) : !0;
        alertMsg(b + "\u53ea\u80fd\u662f\u6570\u5b57\u4e0e\u5b57\u6bcd\u7ec4\u6210");
        return !1
    }
    c = c.trim();
    var k = !0;
    if ("" == c)
        return alertMsg(b + "\u4e0d\u80fd\u4e3a\u7a7a"),
        !1;
    switch (a) {
    case "text":
        d && c.length > d ? (alertMsg(b + "\u4e0d\u80fd\u8d85\u8fc7" + d + "\u4e2a\u5b57"),
        k = !1) : k = !0;
        break;
    case "money":
        k = h();
        break;
    case "name":
        k = g();
        break;
    case "password":
        k = l();
        break;
    case "wxAccount":
        /^[0-9a-zA-Z\-\_]{5,30}$/.test(c) ? k = !0 : (alertMsg("\u5fae\u4fe1\u53f7\u4ec56~30\u4e2a\u5b57\u6bcd\uff0c\u6570\u5b57\uff0c\u4e0b\u5212\u7ebf\u6216\u51cf\u53f7\u7ec4\u6210"),
        k = !1);
        break;
    case "phoneNum":
        /^1[3|4|5|7|8]\d{9}$/.test(c) ? k = !0 : (alertMsg("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7"),
        k = !1)
    }
    return k
}
var BottomBox = function() {
    function a(a, c, d) {
        this.rows = [];
        this.hasCancel = !1;
        this.id = a || "whyNotSet" + String(Date.now());
        this.hasCancel = d;
        this.callback = c
    }
    a.prototype.setHeader = function(a) {
        this.headerString = a
    }
    ;
    a.prototype.setRows = function(a, c) {
        for (var b = 0; b < a.length; b++)
            this.rows.push("<li>" + a[b] + "</li>");
        void 0 !== c && "" !== c && (this.funcs = c)
    }
    ;
    a.prototype.getEntireBox = function() {
        var a = !0 === this.hasCancel ? '<li class="cancel">\u53d6\u6d88</li>' : "";
        return '<div class="bottom_box"><div class="bottom_shade" hidden></div><ul class="bottom_box_main" id="' + this.id + '">' + (void 0 !== this.headerString ? '<li class="header">' + this.headerString + "</li>" : "") + this.rows.join("") + a + "</ul> </div>"
    }
    ;
    a.prototype.bindFunc = function() {
        if (void 0 !== this.funcs)
            for (var a = 0; a < this.funcs.length; a++)
                "" !== this.funcs[a] && void 0 !== this.funcs[a] && $("ul#" + this.id + " li:eq(" + a + ")").click(this.funcs[a]);
        !0 === this.hasCancel && $("ul#" + this.id + " .cancel").click(this.hide);
        $(".shade").click(this.hide)
    }
    ;
    a.prototype.render = function(a) {
        var b = this.getEntireBox();
        void 0 !== a ? a.append(b) : $("bottom_box").append(b);
        this.bindFunc();
        void 0 !== this.callback && this.callback instanceof Function && this.callback()
    }
    ;
    a.prototype.show = function() {
        $(".bottom_box").css("transform", "translateY(0)");
        $(".shade").show()
    }
    ;
    a.prototype.hide = function() {
        $(".bottom_box").css("transform", "translateY(110%)");
        $(".shade").hide()
    }
    ;
    return a
}();
function showBottomBox(a) {
    a ? $(a).parents(".bottom_box").show(1, function() {
        $(a).addClass("on")
    }) : $(".bottom_box").show(1, function() {
        $(".bottom_box_main").addClass("on")
    })
}
function hideBottomBox(a) {
    if (a) {
        var b = -$(a).height();
        $(a).css("margin-bottom", b);
        $(a).removeClass("on");
        setTimeout(function() {
            $(a).parents(".bottom_box").hide();
            $(a).css("margin-bottom", "0")
        }, 500)
    } else
        b = -$(".bottom_box_main.on").height(),
        $(".bottom_box_main.on").css("margin-bottom", b),
        $(".bottom_box_main.on").removeClass("on"),
        setTimeout(function() {
            $(".bottom_box").hide();
            $(".bottom_box_main").css("margin-bottom", "0")
        }, 500)
}
var QueryString = function() {
    for (var a = {}, b = window.location.search.substring(1).split("&"), c = 0; c < b.length; c++) {
        var d = b[c].split("=");
        if ("undefined" === typeof a[d[0]])
            a[d[0]] = decodeURIComponent(d[1]);
        else if ("string" === typeof a[d[0]]) {
            var e = [a[d[0]], decodeURIComponent(d[1])];
            a[d[0]] = e
        } else
            a[d[0]].push(decodeURIComponent(d[1]))
    }
    return a
}()
  , _hmt = _hmt || [];
function addBaiduStatistic() {
    var a = document.createElement("script");
    a.src = "//hm.baidu.com/hm.js?9f8c5d323a26421cb966b5e405d629c3";
    var b = document.getElementsByTagName("script")[0];
    b.parentNode.insertBefore(a, b)
}
var Slider = function() {
    function a(a, c, d, e, f, h) {
        this.animating = this.hasInitial = !1;
        this.isLoop = h || !1;
        this.selector = c;
        this.endTime = this.startTime = this.numOfSlides = this.curSlide = this.diff = 0;
        this.animTime = e || 300;
        this.autoSlideDelay = f || 3E3;
        this.$sliderContainer = $(c);
        this.imgSize = d || "";
        this.slideId = [];
        this.slideFileId = [];
        this.slideData = [];
        for (c = 0; c < a.length; c++)
            this.slideId.push(a[c].id),
            this.slideData.push(a[c].url),
            this.slideFileId.push(a[c].fileId);
        this.initSlide()
    }
    a.prototype.returnSlideNum = function() {
        return this.numOfSlides
    }
    ;
    a.prototype.changeSlideIndex = function() {
        var a = $(".ppt_window .btn_ppt_index")
          , c = this.$sliderContainer.find(".slide[data-id].active").index()
          , d = this.$sliderContainer.find(".slide[data-id]").length;
        1 > c && (c = 1);
        a.html(String(c) + "<var>/" + d + "</var>")
    }
    ;
    a.prototype.changeSlides = function(a) {
        if (!a) {
            this.animating = !0;
            this.$slider.addClass("animating");
            this.$slider.css("top");
            this.$slider.find(".slide").removeClass("active");
            this.$slider.find(".slide-" + this.curSlide).addClass("active");
            var b = this;
            setTimeout(function() {
                b.$slider.removeClass("animating");
                b.animating = !1
            }, this.animTime)
        }
        window.clearTimeout(this.autoSlideTimeout);
        this.$slider.css("transform", "translate3d(" + 100 * -this.curSlide + "%,0,0)");
        this.$slideBGs.css("transform", "translate3d(" + 50 * this.curSlide + "%,0,0)");
        var d = this;
        setTimeout(function() {
            d.curSlide === d.numOfSlides + 1 && (d.$slideBGs.css("transition", "none").css("-webkit-transition", "none"),
            d.$slider.css("transform", "translate3d(-100%,0,0)"),
            d.$slideBGs.css("transform", "translate3d(50%,0,0)"),
            d.$slider.find(".slide").removeClass("active"),
            d.$slider.find(".slide-1").addClass("active"),
            setTimeout(function() {
                d.$slideBGs.css("transition", "transform .5s").css("-webkit-transition", "-webkit-transform .5s")
            }, 100),
            d.curSlide = 1);
            0 === d.curSlide && (d.$slideBGs.css("transition", "none").css("-webkit-transition", "none"),
            d.$slider.css("transform", "translate3d(" + 100 * -d.numOfSlides + "%,0,0)"),
            d.$slideBGs.css("transform", "translate3d(" + 50 * d.numOfSlides + "%,0,0)"),
            d.$slider.find(".slide").removeClass("active"),
            d.$slider.find(".slide-" + d.numOfSlides).addClass("active"),
            setTimeout(function() {
                d.$slideBGs.css("transition", "transform .5s").css("-webkit-transition", "-webkit-transform .5s")
            }, 100),
            d.curSlide = d.numOfSlides)
        }, 400);
        this.changeSlideIndex();
        this.diff = 0;
        0 < this.autoSlideDelay && this.autoSlide()
    }
    ;
    a.prototype.navigateLeft = function() {
        this.animating || (1 === this.curSlide && !1 === this.isLoop ? (this.curSlide = 1,
        this.changeSlides()) : 0 < this.curSlide && (this.curSlide--,
        this.changeSlides()))
    }
    ;
    a.prototype.navigateRight = function() {
        this.animating || (this.curSlide === this.numOfSlides && !1 === this.isLoop ? (this.curSlide = this.numOfSlides,
        this.changeSlides()) : this.curSlide < this.numOfSlides + 1 && (this.curSlide++,
        this.changeSlides()))
    }
    ;
    a.prototype.jumpToSlide = function(a) {
        1 > a || a > this.numOfSlides || (this.curSlide = a,
        this.changeSlides())
    }
    ;
    a.prototype.addSlide = function(a, c, d) {
        this.createSlideItem(a, c, d)
    }
    ;
    a.prototype.removeSlide = function(a) {
        if (!(1 > a || a > this.numOfSlides)) {
            this.curSlide === this.numOfSlides && (this.curSlide--,
            this.changeSlides());
            var b = this.$slider.find(".slide:nth-child(" + (a + 1) + ")")
              , d = b.data("id");
            b.data("fileid");
            b.find("img").attr("src");
            b = this.slideId.indexOf(String(d));
            this.slideData.splice(b, 1);
            this.slideId.splice(b, 1);
            for (this.slideFileId.splice(b, 1); a < this.numOfSlides; a++) {
                var b = this.$slider.find(".slide:nth-child(" + (a + 2) + ") img").attr("src")
                  , d = this.$slider.find(".slide:nth-child(" + (a + 2) + ")").attr("data-id")
                  , e = this.$slider.find(".slide:nth-child(" + (a + 2) + ")").attr("data-fileId");
                this.$slider.find(".slide:nth-child(" + (a + 1) + ") img").attr("src", b);
                this.$slider.find(".slide:nth-child(" + (a + 1) + ")").attr("data-id", d);
                this.$slider.find(".slide:nth-child(" + (a + 1) + ")").attr("data-fileId", e)
            }
            this.$slider.find(".slide:nth-child(" + (this.numOfSlides + 2) + ")").remove();
            this.numOfSlides--;
            this.refreshSlide()
        }
    }
    ;
    a.prototype.initSlide = function() {
        if (0 === this.slideData.length)
            $(".btn_cancel_ppt,.btn_ppt_index").hide();
        else {
            this.hasInitial = !0;
            var a = this.$sliderContainer.find(".slider-container");
            0 < a.length && a.remove();
            a = '\n        <div class="slider-container" id="ppt_slider">\n            <div class="slider">\n            </div>\n        </div>';
            isiOS() || isAndroid() || (a += '<span class="icon_back" ></span><span class="icon_enter" ></span>');
            this.$sliderContainer.append(a);
            this.$slider = this.$sliderContainer.find(".slider");
            a = '<div class="slide slide-' + (this.slideData.length + 1) + '" style="left:' + 100 * (this.slideData.length + 1) + '%;">\n                    <a href="javascript:;" class="slide_bg" style="left:' + 50 * -(this.slideData.length + 1) + '%;">\n                        <img src="">\n                    </a>\n                </div>';
            this.$slider.append('<div class="slide slide-0" style="left:0;">\n                    <a href="javascript:;" class="slide_bg" style="left:0;">\n                        <img src="">\n                    </a>\n                </div>');
            this.$slider.append(a);
            for (a = 0; a < this.slideData.length; a++)
                this.createSlideItem(this.slideId[a], this.slideData[a], this.slideFileId[a]);
            this.bindSlideEvent()
        }
    }
    ;
    a.prototype.createSlideItem = function(a, c, d) {
        0 > this.slideData.indexOf(c) && (this.slideId.push(a),
        this.slideData.push(c),
        this.slideFileId.push(d));
        !1 === this.hasInitial ? this.initSlide() : (a = '<div class="slide slide-' + (this.numOfSlides + 1) + '" data-id="' + a + '" data-fileid="' + d + '" style="left:' + 100 * (this.numOfSlides + 1) + '%;">\n                    <a href="javascript:;" class="slide_bg" style="left:' + 50 * -(this.numOfSlides + 1) + '%">\n                        <img src="' + c + this.imgSize + '">\n                    </a>\n                </div>',
        c = this.$slider.find(".slide:last-child"),
        c.removeClass("slide-" + (this.numOfSlides + 1)).addClass("slide-" + (this.numOfSlides + 2)),
        c.before(a),
        this.numOfSlides++,
        this.refreshSlide(),
        0 < this.autoSlideDelay && this.autoSlide())
    }
    ;
    a.prototype.refreshSlide = function() {
        this.$slideBGs = this.$slider.find(".slide_bg");
        var a = this.slideData[0]
          , c = this.slideData[this.slideData.length - 1];
        this.$slider.find(".slide:last-child").removeAttr("data-id").removeAttr("data-fileid").css("left", "" + 100 * (this.numOfSlides + 1) + "%").find(".slide_bg").css("left", "" + 50 * -(this.numOfSlides + 1) + "%").find("img").attr("src", a + this.imgSize);
        this.$slider.find(".slide:first-child").find("img").attr("src", c + this.imgSize);
        0 === this.slideData.length ? (this.$sliderContainer.find(".slider-container").html(""),
        this.hasInitial = !1,
        $(".btn_cancel_ppt,.btn_ppt_index").hide()) : $(".btn_cancel_ppt,.btn_ppt_index").show()
    }
    ;
    a.prototype.autoSlide = function() {
        var a = this;
        this.autoSlideTimeout = setTimeout(function() {
            a.curSlide++;
            a.curSlide > a.numOfSlides + 1 && (a.curSlide = 1);
            a.changeSlides()
        }, a.autoSlideDelay)
    }
    ;
    a.prototype.bindSlideEvent = function() {
        var a = this
          , c = this.$sliderContainer.find(".icon_back")
          , d = this.$sliderContainer.find(".icon_enter");
        0 < c.length && (c.click(function() {
            a.navigateLeft()
        }),
        d.click(function() {
            a.navigateRight()
        }));
        $(document).on("touchstart", String(a.selector) + " .slider", function(b) {
            a.startTime = Date.now();
            if (!a.animating) {
                window.clearTimeout(a.autoSlideTimeout);
                var c = b.pageX || b.originalEvent.touches[0].pageX
                  , d = $(window).width();
                a.diff = 0;
                $(document).on("touchmove", String(a.selector) + " .slider", function(b) {
                    a.diff = (c - (b.pageX || b.originalEvent.touches[0].pageX)) / d * 70;
                    if (!a.curSlide && 0 > a.diff || a.curSlide === a.numOfSlides && 0 < a.diff)
                        a.diff /= 2;
                    a.$slider.css("transform", "translate3d(" + (100 * -a.curSlide - a.diff) + "%,0,0)");
                    a.$slideBGs.css("transform", "translate3d(" + (50 * a.curSlide + a.diff / 2) + "%,0,0)")
                })
            }
        });
        $(document).on("touchend", String(a.selector) + " .slider", function(b) {
            a.endTime = Date.now();
            if (!a.animating) {
                $(document).off("touchmove", String(a.selector) + " .slider");
                b = a.endTime - a.startTime;
                if (500 > b) {
                    if (-4 >= a.diff) {
                        a.navigateLeft();
                        return
                    }
                    if (4 <= a.diff) {
                        a.navigateRight();
                        return
                    }
                }
                1200 < b && -50 < a.diff && 50 > a.diff ? a.changeSlides() : a.diff ? -20 < a.diff && 20 > a.diff ? a.changeSlides() : -20 >= a.diff ? a.navigateLeft() : 20 <= a.diff && a.navigateRight() : a.changeSlides(!0)
            }
        })
    }
    ;
    return a
}()
  , reloadBy = function(a) {
    return function(b) {
        var c = window.location.href
          , d = new RegExp("([?&])" + a + "=.*?(&|$)","i")
          , e = -1 !== c.indexOf("?") ? "&" : "?";
        return c.match(d) ? c.replace(d, "$1" + a + "=" + b + "$2") : c + e + a + "=" + b
    }
}
  , reloadByTimeStamp = reloadBy("restime")
  , reloadByTimeStampInstant = function() {
    var a = Date.now()
      , a = reloadByTimeStamp(a);
    window.location.href = a
};
function operateDOMNumber(a) {
    return function(b) {
        $(b).text(String(Number($(b).text()) + a))
    }
}
var plus1 = operateDOMNumber(1)
  , minus1 = operateDOMNumber(-1);
function codeCountdown(a, b, c, d) {
    var e;
    try {
        if (sessionStorage.getItem(d)) {
            e = Number(sessionStorage.getItem(d));
            var f = (new Date).getTime();
            if (f - e < 1E3 * c) {
                b.hide();
                a.text((c - (f - e) / 1E3).toFixed(0));
                a.show();
                var h = setInterval(function() {
                    var d = (new Date).getTime()
                      , d = (c - (d - e) / 1E3).toFixed(0);
                    0 < d ? a.text(d) : (clearInterval(h),
                    b.show(),
                    a.hide())
                }, 1E3)
            }
        }
    } catch (g) {}
}
function appJump(a, b, c, d, e) {
    e = "undefined" != typeof e ? e : "https://img.qlchat.com/qlLive/liveCommon/normalShareLogo.png?v=1";
    /(http)/.test(b) || (b = CtxPath + b);
    switch (a) {
    case "jumpChannel":
        a = b.replace(/(.*\/)/, "").replace(/\..*/, "");
        window.location.href = "qlchat://dl/live/channel/homepage?channelId=" + a;
        break;
    case "shareFriend":
        /(javascript)/.test(b) || (b = shareLinkReplace(b),
        b = encodeURIComponent(b),
        e = encodeURIComponent(e),
        d = encodeURIComponent(d),
        window.location.href = "qlchat://dl/share/link?title=" + c + "&content=" + d + "&shareUrl=" + b + "&thumbImageUrl=" + e);
        break;
    case "shareCard":
        b = b.replace("http://", "https://"),
        b = encodeURIComponent(b),
        window.location.href = "qlchat://dl/share/system/photo?photoUrl=" + b
    }
}
$(document).on("click", ".appJump", function(a) {
    if ("app" == getCookie("caller")) {
        a.preventDefault();
        a = "jumpChannel";
        var b = ""
          , c = ""
          , d = "";
        $(this).attr("app-jump-type") && (a = $(this).attr("app-jump-type"));
        0 < $(".appJumpBox").length && (b = $(".appJumpBox").attr("app-jump-url"),
        c = $(".appJumpBox").attr("app-jump-title"),
        d = $(".appJumpBox").attr("app-jump-content"));
        /(javascript)/.test($(this).attr("href")) || (b = $(this).attr("href"));
        appJump(a, b, c, d)
    }
});
var pageRandomNum = (9999 * Math.random()).toFixed(0);
try {
    localStorage.setItem("pageRandomNum", pageRandomNum)
} catch (a) {}
var Fetch = function() {
    function a() {}
    a.prototype.json = function(a, c, d, e, f) {
        c = JSON.stringify(c);
        $.ajax({
            type: f ? f.toUpperCase() : "POST",
            contentType: "application/json; charset=utf-8",
            url: String(a),
            data: c,
            success: d || this.voidFunc,
            error: e || this.voidFunc
        })
    }
    ;
    a.prototype.string = function(a, c, d, e, f) {
        $.ajax({
            type: f ? f.toUpperCase() : "POST",
            url: String(a),
            data: c,
            success: d || this.voidFunc,
            error: e || this.voidFunc
        })
    }
    ;
    a.prototype.voidFunc = function(a) {
        a && a.state && a.state.msg && alertMsg(a.state.msg)
    }
    ;
    return a
}(), wxPayType, isNoPaying = !0;
function wxPayCommon(a, b, c, d, e, f, h, g) {
    isNoPaying && (isNoPaying = !1,
    b = "Y",
    b = isWeixin() && (isiOS() || isAndroid()) ? "Y" : "N",
    a = {
        byUserId: a,
        liveId: window.liveId,
        type: d,
        total_fee: e,
        ifboth: b
    },
    "undefined" != typeof c && "" != c && (a.topicId = c),
    "undefined" != typeof shareKey && "" != shareKey && (a.shareKey = shareKey),
    c = "object" == typeof f ? $.extend(a, f) : a,
    $.ajax({
        type: "POST",
        url: "/live/pay/UnifiedOrder.htm",
        data: c,
        success: function(a) {
            "200" == a.statusCode ? isiOS() || isAndroid() ? callWxPay(a, h, g) : a.isPayDev ? "function" == typeof h && h(qcodeId) : (getPayQRCode(a.qcodeUrl, a.qcodeId, h, g),
            $(".loadingBox").hide(),
            qlSlBoxShow(".payQrBox"),
            $(".payQrBox .kuaSpan").hide(),
            isNoPaying = !0) : "205" == a.statusCode ? ($(".loadingBox").hide(),
            $(document).minTipsBox({
                tipsContent: a.msg,
                tipsTime: 2
            }),
            window.location.href = "channel" === window.pageType ? "/live/channel/channelPage/" + window.liveId + ".htm?restime==" + (new Date).getTime() : "/topic/" + window.topicId + ".htm?restime==" + (new Date).getTime()) : ($(".loadingBox").hide(),
            $(document).minTipsBox({
                tipsContent: a.msg,
                tipsTime: 2
            }))
        },
        error: function(a) {
            isNoPaying = !0;
            $(document).minTipsBox({
                tipsContent: a.msg,
                tipsTime: 1
            })
        }
    }))
}
function getPayQRCode(a, b, c, d) {
    void 0 !== a && ($(".payQrBox .payQrPic").attr("src", "https://pan.baidu.com/share/qrcode?w=300&h=300&url=" + a),
    setTimeout(function() {
        openPayTimer(b, c, 3E3, d)
    }, 10))
}
var payQrtimer = "";
function openPayTimer(a, b, c, d) {
    payQrtimer = setTimeout(function() {
        $.ajax({
            type: "POST",
            url: "/live/selectPayResult.htm",
            data: {
                orderID: a
            },
            success: function(e) {
                "200" == e.statusCode ? "SUCCESS" == e.msg ? (clearTimeout(payQrtimer),
                $(".payQrBox").hide(),
                d && payTrace(d),
                "function" == typeof b && b(a)) : "CANCEL" == e.msg ? $(document).popBox({
                    boxContent: "\u5fae\u4fe1\u652f\u4ed8\u5904\u7406\u4e2d\uff0c\u8bf7\u7a0d\u540e\u518d\u770b,<br>\u6216\u8005\u8054\u7cfb\u7ba1\u7406\u5458.",
                    btnType: "cancel",
                    cancelName: "\u5173\u95ed"
                }) : (clearTimeout(payQrtimer),
                $(document).minTipsBox({
                    tipsContent: "\u652f\u4ed8\u5931\u8d25",
                    tipsTime: 1
                })) : "1" == e.statusCode && openPayTimer(a, b, c, d)
            },
            error: function(a) {
                $(document).minTipsBox({
                    tipsContent: a.msg,
                    tipsTime: 1
                })
            }
        })
    }, c)
}
function callWxPay(a, b, c) {
    localStorage.setItem("giftOrderId", a.orderId);
    "undefined" == typeof WeixinJSBridge ? (document.addEventListener ? document.addEventListener("WeixinJSBridgeReady", onWxBridgeReady, !1) : document.attachEvent && (document.attachEvent("WeixinJSBridgeReady", onWxBridgeReady),
    document.attachEvent("onWeixinJSBridgeReady", onWxBridgeReady)),
    isNoPaying = !0) : (getPayQRCode(a.qcodeUrl, a.qcodeId, b, c),
    onWxBridgeReady(a, b, c))
}
function onWxBridgeReady(a, b, c) {
    WeixinJSBridge.invoke("getBrandWCPayRequest", {
        appId: a.appId,
        timeStamp: a.timeStamp,
        nonceStr: a.nonceStr,
        "package": a.packageValue,
        signType: a.signType,
        paySign: a.paySign
    }, function(d) {
        "get_brand_wcpay_request:ok" == d.err_msg ? ($(".payQrBox").hide(),
        isNoPaying = !0,
        c && payTrace(c),
        openPayTimer(a.orderId, b, 1500, c)) : "get_brand_wcpay_request:cancel" == d.err_msg ? ($(".loadingBox").hide(),
        $(document).minTipsBox({
            tipsContent: "\u5df2\u53d6\u6d88\u4ed8\u8d39",
            tipsTime: 1
        }),
        isNoPaying = !0) : "get_brand_wcpay_request:fail" == d.err_msg && ($(".loadingBox").hide(),
        $(document).minTipsBox({
            tipsContent: "\u8bf7\u4f7f\u7528\u5fae\u4fe1\u4e8c\u7ef4\u7801\u652f\u4ed8",
            tipsTime: 1
        }),
        qlSlBoxShow(".payQrBox"),
        isNoPaying = !0)
    })
}
function payTrace(a) {
    _qla && _qla("event", {
        category: "wechatPay",
        action: "success",
        business_id: a.id,
        business_type: a.type,
        business_pay_type: a.payType,
        trace_page: sessionStorage.getItem("trace_page") || ""
    })
}
var getSCOver = !0;
function getShareCardCode(a, b, c, d) {
    a = {
        businessId: a,
        type: b
    };
    "" != c && (a.joinType = c);
    getSCOver && $.ajax({
        type: "POST",
        url: "/topic/share/saveshare.htm",
        contentType: "application/json",
        data: JSON.stringify(a),
        success: function(a) {
            var b = a.state;
            a = a.data;
            getSCOver = !0;
            "200" == b.code ? "function" == typeof d && d(a) : $(document).minTipsBox({
                tipsContent: b.msg,
                tipsTime: 1
            })
        },
        error: function(a) {
            getSCOver = !0;
            $(document).minTipsBox({
                tipsContent: a.msg,
                tipsTime: 1
            })
        }
    })
}
cheakNewPoint();
$(document).on("click", ".newPointBtn", function() {
    "Y" != $(this).attr("isNotLocalstorage") && (newPointList[$(this).attr("attr-npval")] || (newPointList[$(this).attr("attr-npval")] = (new Date).getTime(),
    localStorage.setItem("newPointList", JSON.stringify(newPointList))),
    window.location.href = $(this).attr("href"),
    cheakNewPoint())
});
jQuery(function(a) {
    0 < a(".hasMineNew").length && a.ajax({
        type: "GET",
        url: "/live/entity/redDot.htm",
        data: {
            userId: a(".hasMineNew").attr("attr-id")
        },
        success: function(b) {
            "200" == b.statusCode && b.data && "Y" == b.data.isPushNew && a(".hasMineNew").not(".on").append('<span class="mineNewPoint"></span>')
        },
        error: function() {
            a(document).minTipsBox({
                tipsContent: data.msg,
                tipsTime: 1
            })
        }
    });
    try {
        if (sessionStorage.getItem("isDataChange_A")) {
            var b = sessionStorage.getItem("isDataChange_A")
              , c = sessionStorage.getItem("isDataChange_B");
            b != c && (sessionStorage.setItem("isDataChange_A", c),
            window.location.reload(!0))
        } else
            sessionStorage.setItem("isDataChange_A", 1),
            sessionStorage.setItem("isDataChange_B", 1);
        if ("true" == localStorage.getItem("isShare") && 0 < a(".isShare").length) {
            a(".isShare").show();
            clearTimeout(d);
            var d = setTimeout(function() {
                a(".isShare").hide();
                localStorage.setItem("isShare", "false")
            }, 5E3)
        }
    } catch (f) {}
    if (isAndroid()) {
        var e = {
            E415: "D83D,DE04",
            E056: "D83D,DE0A",
            E057: "D83D,DE03",
            E414: "263A",
            E405: "D83D,DE09",
            E106: "D83D,DE0D",
            E418: "D83D,DE18",
            E417: "D83D,DE1A",
            E40D: "D83D,DE33",
            E40A: "D83D,DE0C",
            E404: "D83D,DE01",
            E105: "D83D,DE1C",
            E409: "D83D,DE1D",
            E40E: "D83D,DE12",
            E402: "D83D,DE0F",
            E108: "D83D,DE13",
            E403: "D83D,DE14",
            E058: "D83D,DE1E",
            E407: "D83D,DE16",
            E401: "D83D,DE25",
            E40F: "D83D,DE30",
            E40B: "D83D,DE28",
            E406: "D83D,DE23",
            E413: "D83D,DE22",
            E411: "D83D,DE2D",
            E412: "D83D,DE02",
            E410: "D83D,DE32",
            E107: "D83D,DE31",
            E059: "D83D,DE20",
            E416: "D83D,DE21",
            E408: "D83D,DE2A",
            E40C: "D83D,DE37",
            E11A: "D83D,DC7F",
            E10C: "D83D,DC7D",
            E32C: "D83D,DC9B",
            E32A: "D83D,DC99",
            E32D: "D83D,DC9C",
            E328: "D83D,DC97",
            E32B: "D83D,DC9A",
            E022: "2764",
            E023: "D83D,DC94",
            E327: "D83D,DC93",
            E329: "D83D,DC98",
            E32E: "2728",
            E335: "D83C,DF1F",
            E334: "D83D,DCA2",
            E337: "2755",
            E336: "2754",
            E13C: "D83D,DCA4",
            E330: "D83D,DCA8",
            E331: "D83D,DCA6",
            E326: "D83C,DFB6",
            E03E: "D83C,DFB5",
            E11D: "D83D,DD25",
            E05A: "D83D,DCA9",
            E00E: "D83D,DC4D",
            E421: "D83D,DC4E",
            E420: "D83D,DC4C",
            E00D: "D83D,DC4A",
            E010: "270A",
            E011: "270C",
            E41E: "D83D,DC4B",
            E012: "270B",
            E422: "D83D,DC50",
            E22E: "D83D,DC46",
            E22F: "D83D,DC47",
            E231: "D83D,DC49",
            E230: "D83D,DC48",
            E427: "D83D,DE4C",
            E41D: "D83D,DE4F",
            E00F: "261D",
            E41F: "D83D,DC4F",
            E14C: "D83D,DCAA",
            E201: "D83D,DEB6",
            E115: "D83C,DFC3",
            E428: "D83D,DC6B",
            E51F: "D83D,DC83",
            E429: "D83D,DC6F",
            E424: "D83D,DE46",
            E423: "D83D,DE45",
            E253: "D83D,DC81",
            E426: "D83D,DE47",
            E111: "D83D,DC8F",
            E425: "D83D,DC91",
            E31E: "D83D,DC86",
            E31F: "D83D,DC87",
            E31D: "D83D,DC85",
            E001: "D83D,DC66",
            E002: "D83D,DC67",
            E005: "D83D,DC69",
            E004: "D83D,DC68",
            E51A: "D83D,DC76",
            E519: "D83D,DC75",
            E518: "D83D,DC74",
            E515: "D83D,DC71",
            E516: "D83D,DC72",
            E517: "D83D,DC73",
            E51B: "D83D,DC77",
            E152: "D83D,DC6E",
            E04E: "D83D,DC7C",
            E51C: "D83D,DC78",
            E51E: "D83D,DC82",
            E11C: "D83D,DC80",
            E536: "D83D,DC63",
            E003: "D83D,DC8B",
            E41C: "D83D,DC44",
            E41B: "D83D,DC42",
            E419: "D83D,DC40",
            E41A: "D83D,DC43",
            E436: "D83C,DF8D",
            E437: "D83D,DC9D",
            E438: "D83C,DF8E",
            E43A: "D83C,DF92",
            E439: "D83C,DF93",
            E43B: "D83C,DF8F",
            E117: "D83C,DF86",
            E440: "D83C,DF87",
            E442: "D83C,DF90",
            E446: "D83C,DF91",
            E445: "D83C,DF83",
            E11B: "D83D,DC7B",
            E448: "D83C,DF85",
            E033: "D83C,DF84",
            E112: "D83C,DF81",
            E325: "D83D,DD14",
            E312: "D83C,DF89",
            E310: "D83C,DF88",
            E126: "D83D,DCBF",
            E127: "D83D,DCC0",
            E008: "D83D,DCF7",
            E03D: "D83C,DFA5",
            E00C: "D83D,DCBB",
            E12A: "D83D,DCFA",
            E00A: "D83D,DCF1",
            E00B: "D83D,DCE0",
            E009: "260E",
            E316: "D83D,DCBD",
            E129: "D83D,DCFC",
            E141: "D83D,DD0A",
            E142: "D83D,DCE2",
            E317: "D83D,DCE3",
            E128: "D83D,DCFB",
            E14B: "D83D,DCE1",
            E211: "27BF",
            E114: "D83D,DD0D",
            E145: "D83D,DD13",
            E144: "D83D,DD12",
            E03F: "D83D,DD11",
            E313: "2702",
            E116: "D83D,DD28",
            E10F: "D83D,DCA1",
            E104: "D83D,DCF2",
            E103: "D83D,DCE9",
            E101: "D83D,DCEB",
            E102: "D83D,DCEE",
            E13F: "D83D,DEC0",
            E140: "D83D,DEBD",
            E11F: "D83D,DCBA",
            E12F: "D83D,DCB0",
            E031: "D83D,DD31",
            E30E: "D83D,DEAC",
            E311: "D83D,DCA3",
            E113: "D83D,DD2B",
            E30F: "D83D,DC8A",
            E13B: "D83D,DC89",
            E42B: "D83C,DFC8",
            E42A: "D83C,DFC0",
            E018: "26BD",
            E016: "26BE",
            E015: "D83C,DFBE",
            E014: "26F3",
            E42C: "D83C,DFB1",
            E42D: "D83C,DFCA",
            E017: "D83C,DFC4",
            E013: "D83C,DFBF",
            E20E: "2660",
            E20C: "2665",
            E20F: "2663",
            E20D: "2666",
            E131: "D83C,DFC6",
            E12B: "D83D,DC7E",
            E130: "D83C,DFAF",
            E12D: "D83C,DC04",
            E324: "D83C,DFAC",
            E301: "D83D,DCDD",
            E148: "D83D,DCD6",
            E502: "D83C,DFA8",
            E03C: "D83C,DFA4",
            E30A: "D83C,DFA7",
            E042: "D83C,DFBA",
            E040: "D83C,DFB7",
            E041: "D83C,DFB8",
            E12C: "303D",
            E007: "D83D,DC5F",
            E31A: "D83D,DC61",
            E13E: "D83D,DC60",
            E31B: "D83D,DC62",
            E006: "D83D,DC55",
            E302: "D83D,DC54",
            E319: "D83D,DC57",
            E321: "D83D,DC58",
            E322: "D83D,DC59",
            E314: "D83C,DF80",
            E503: "D83C,DFA9",
            E10E: "D83D,DC51",
            E318: "D83D,DC52",
            E43C: "D83C,DF02",
            E11E: "D83D,DCBC",
            E323: "D83D,DC5C",
            E31C: "D83D,DC84",
            E034: "D83D,DC8D",
            E035: "D83D,DC8E",
            E045: "2615",
            E338: "D83C,DF75",
            E047: "D83C,DF7A",
            E30C: "D83C,DF7B",
            E044: "D83C,DF78",
            E30B: "D83C,DF76",
            E043: "D83C,DF74",
            E120: "D83C,DF54",
            E33B: "D83C,DF5F",
            E33F: "D83C,DF5D",
            E341: "D83C,DF5B",
            E34C: "D83C,DF71",
            E344: "D83C,DF63",
            E342: "D83C,DF59",
            E33D: "D83C,DF58",
            E33E: "D83C,DF5A",
            E340: "D83C,DF5C",
            E34D: "D83C,DF72",
            E339: "D83C,DF5E",
            E147: "D83C,DF73",
            E343: "D83C,DF62",
            E33C: "D83C,DF61",
            E33A: "D83C,DF66",
            E43F: "D83C,DF67",
            E34B: "D83C,DF82",
            E046: "D83C,DF70",
            E345: "D83C,DF4E",
            E346: "D83C,DF4A",
            E348: "D83C,DF49",
            E347: "D83C,DF53",
            E34A: "D83C,DF46",
            E349: "D83C,DF45",
            E04A: "2600",
            E04B: "2614",
            E049: "2601",
            E048: "26C4",
            E04C: "D83C,DF19",
            E13D: "26A1",
            E443: "D83C,DF00",
            E43E: "D83C,DF0A",
            E04F: "D83D,DC31",
            E052: "D83D,DC36",
            E053: "D83D,DC2D",
            E524: "D83D,DC39",
            E52C: "D83D,DC30",
            E52A: "D83D,DC3A",
            E531: "D83D,DC38",
            E050: "D83D,DC2F",
            E527: "D83D,DC28",
            E051: "D83D,DC3B",
            E10B: "D83D,DC37",
            E52B: "D83D,DC2E",
            E52F: "D83D,DC17",
            E109: "D83D,DC35",
            E528: "D83D,DC12",
            E01A: "D83D,DC34",
            E134: "D83D,DC0E",
            E530: "D83D,DC2B",
            E529: "D83D,DC11",
            E526: "D83D,DC18",
            E52D: "D83D,DC0D",
            E521: "D83D,DC26",
            E523: "D83D,DC24",
            E52E: "D83D,DC14",
            E055: "D83D,DC27",
            E525: "D83D,DC1B",
            E10A: "D83D,DC19",
            E522: "D83D,DC20",
            E019: "D83D,DC1F",
            E054: "D83D,DC33",
            E520: "D83D,DC2C",
            E306: "D83D,DC90",
            E030: "D83C,DF38",
            E304: "D83C,DF37",
            E110: "D83C,DF40",
            E032: "D83C,DF39",
            E305: "D83C,DF3B",
            E303: "D83C,DF3A",
            E118: "D83C,DF41",
            E447: "D83C,DF43",
            E119: "D83C,DF42",
            E307: "D83C,DF34",
            E308: "D83C,DF35",
            E444: "D83C,DF3E",
            E441: "D83D,DC1A",
            E21C: "31,20E3",
            E21D: "32,20E3",
            E21E: "33,20E3",
            E21F: "34,20E3",
            E220: "35,20E3",
            E221: "36,20E3",
            E222: "37,20E3",
            E223: "38,20E3",
            E224: "39,20E3",
            E225: "30,20E3",
            E210: "23,20E3",
            E232: "2B06",
            E233: "2B07",
            E235: "2B05",
            E234: "27A1",
            E236: "2197",
            E237: "2196",
            E238: "2198",
            E239: "2199",
            E23B: "25C0",
            E23A: "25B6",
            E23D: "23EA",
            E23C: "23E9",
            E24D: "D83C,DD97",
            E212: "D83C,DD95",
            E24C: "D83D,DD1D",
            E213: "D83C,DD99",
            E214: "D83C,DD92",
            E507: "D83C,DFA6",
            E203: "D83C,DE01",
            E20B: "D83D,DCF6",
            E22A: "D83C,DE35",
            E22B: "D83C,DE33",
            E226: "D83C,DE50",
            E227: "D83C,DE39",
            E22C: "D83C,DE2F",
            E22D: "D83C,DE3A",
            E215: "D83C,DE36",
            E216: "D83C,DE1A",
            E217: "D83C,DE37",
            E218: "D83C,DE38",
            E228: "D83C,DE02",
            E151: "D83D,DEBB",
            E138: "D83D,DEB9",
            E139: "D83D,DEBA",
            E13A: "D83D,DEBC",
            E208: "D83D,DEAD",
            E14F: "D83C,DD7F",
            E20A: "267F",
            E434: "D83D,DE87",
            E309: "D83D,DEBE",
            E315: "3299",
            E30D: "3297",
            E207: "D83D,DD1E",
            E229: "D83C,DD94",
            E206: "2733",
            E205: "2734",
            E204: "D83D,DC9F",
            E12E: "D83C,DD9A",
            E250: "D83D,DCF3",
            E251: "D83D,DCF4",
            E14A: "D83D,DCB9",
            E149: "D83D,DCB1",
            E23F: "2648",
            E240: "2649",
            E241: "264A",
            E242: "264B",
            E243: "264C",
            E244: "264D",
            E245: "264E",
            E246: "264F",
            E247: "2650",
            E248: "2651",
            E249: "2652",
            E24A: "2653",
            E24B: "26CE",
            E23E: "D83D,DD2F",
            E532: "D83C,DD70",
            E533: "D83C,DD71",
            E534: "D83C,DD8E",
            E535: "D83C,DD7E",
            E21A: "D83D,DD32",
            E219: "D83D,DD34",
            E21B: "D83D,DD33",
            E02F: "D83D,DD5B",
            E024: "D83D,DD50",
            E025: "D83D,DD51",
            E026: "D83D,DD52",
            E027: "D83D,DD53",
            E028: "D83D,DD54",
            E029: "D83D,DD55",
            E02A: "D83D,DD56",
            E02B: "D83D,DD57",
            E02C: "D83D,DD58",
            E02D: "D83D,DD59",
            E02E: "D83D,DD5A",
            E332: "2B55",
            E333: "274C",
            E24E: "A9",
            E24F: "AE",
            E537: "2122",
            E036: "D83C,DFE0",
            E157: "D83C,DFEB",
            E038: "D83C,DFE2",
            E153: "D83C,DFE3",
            E155: "D83C,DFE5",
            E14D: "D83C,DFE6",
            E156: "D83C,DFEA",
            E501: "D83C,DFE9",
            E158: "D83C,DFE8",
            E43D: "D83D,DC92",
            E037: "26EA",
            E504: "D83C,DFEC",
            E44A: "D83C,DF07",
            E146: "D83C,DF06",
            E154: "D83C,DFE7",
            E505: "D83C,DFEF",
            E506: "D83C,DFF0",
            E122: "26FA",
            E508: "D83C,DFED",
            E509: "D83D,DDFC",
            E03B: "D83D,DDFB",
            E04D: "D83C,DF04",
            E449: "D83C,DF05",
            E44B: "D83C,DF03",
            E51D: "D83D,DDFD",
            E44C: "D83C,DF08",
            E124: "D83C,DFA1",
            E121: "26F2",
            E433: "D83C,DFA2",
            E202: "D83D,DEA2",
            E135: "D83D,DEA4",
            E01C: "26F5",
            E01D: "2708",
            E10D: "D83D,DE80",
            E136: "D83D,DEB2",
            E42E: "D83D,DE99",
            E01B: "D83D,DE97",
            E15A: "D83D,DE95",
            E159: "D83D,DE8C",
            E432: "D83D,DE93",
            E430: "D83D,DE92",
            E431: "D83D,DE91",
            E42F: "D83D,DE9A",
            E01E: "D83D,DE83",
            E039: "D83D,DE89",
            E435: "D83D,DE84",
            E01F: "D83D,DE85",
            E125: "D83C,DFAB",
            E03A: "26FD",
            E14E: "D83D,DEA5",
            E252: "26A0",
            E137: "D83D,DEA7",
            E209: "D83D,DD30",
            E133: "D83C,DFB0",
            E150: "D83D,DE8F",
            E320: "D83D,DC88",
            E123: "2668",
            E132: "D83C,DFC1",
            E143: "D83C,DF8C",
            E50B: "D83C,DDEF,D83C,DDF5",
            E514: "D83C,DDF0,D83C,DDF7",
            E513: "D83C,DDE8,D83C,DDF3",
            E50C: "D83C,DDFA,D83C,DDF8",
            E50D: "D83C,DDEB,D83C,DDF7",
            E511: "D83C,DDEA,D83C,DDF8",
            E50F: "D83C,DDEE,D83C,DDF9",
            E512: "D83C,DDF7,D83C,DDFA",
            E510: "D83C,DDEC,D83C,DDE7",
            E50E: "D83C,DDE9,D83C,DDEA"
        };
        a(document).on("keyup", "input,textarea", function(b, c) {
            b = a(this).val().trim();
            b = b.substr(b.length - 1);
            var d = "";
            for (i = 0; i < b.length; i++)
                d = b.charCodeAt(i).toString(16);
            d = d.toUpperCase();
            if (e[d]) {
                c = "";
                d = e[d].split(",");
                for (i = 0; i < d.length; i++)
                    c += String.fromCharCode(parseInt(d[i], 16));
                b = a(this).val().replace(b, c);
                a(this).val(b)
            }
        })
    }
    a(document).on("focus", "textarea[placeholder]", function() {
        var b = a(this)
          , c = b.attr("placeholder");
        b.attr({
            placeholder: "",
            "placeholder-cache": c
        })
    }).on("blur", "textarea[placeholder]", function() {
        var b = a(this)
          , c = b.attr("placeholder-cache");
        b.attr({
            placeholder: c,
            "placeholder-cache": ""
        })
    });
    a(document).on("click", ".gene_cancel,.qlGbBg,.gene_close", function() {
        a(this).parents(".geneBox").hide()
    });
    a(document).on("click", ".qlMTBg,.qlMT_close,.qlMTBg,.qlMT_close2,.tlbtn_cancel", function() {
        a(this).parents(".qlMsgTips").hide()
    });
    a(".selet_list").click(function() {
        a(".selet_list").removeClass("on")
    });
    a("body").on("click", ".btn_select", function() {
        var b = a(this).attr("name");
        a(".selet_list[name=" + b + "]").addClass("on")
    }).on("click", ".selet_list li", function() {
        var b = a(this).parents(".selet_list").attr("name");
        a(".btn_select[name=" + b + "]").text(a(this).text())
    });
    a(document).on("click", ".bottom_box .cancel,.bottom_shade", function() {
        hideBottomBox()
    });
    a(document).on("click", ".btn_qlcheckbox", function() {
        if (!a(this).hasClass("disabled")) {
            var b;
            a(this).data("group") ? (b = a(this).data("group"),
            a(".btn_qlcheckbox[data-group=" + b + "]").removeClass("on"),
            a(this).addClass("on")) : a(this).toggleClass("on")
        }
    });
    a(document).on("click", ".btn_qlradio", function() {
        a(this).parents(".qlradio_group").find(".btn_qlradio").removeClass("on");
        a(this).parents(".qlradio_group").find(".qlradio_list").removeClass("on");
        a(this).parents(".qlradio_list").addClass("on");
        a(this).addClass("on")
    });
    a(document).on("click", ".qlradio_list", function() {
        a(this).parents(".qlradio_group").find(".btn_qlradio").removeClass("on");
        a(this).parents(".qlradio_group").find(".qlradio_list").removeClass("on");
        a(this).find(".btn_qlradio").addClass("on");
        a(this).addClass("on")
    });
    a(document).on("click", ".qlSlBg,.qlSelectBox .selectUl li", function() {
        a(".qlSelectBox").hide()
    });
    a(".qlbmibtn_closed").click(function() {
        a(this).parents(".ql_notice,.ql_notice_rem").hide()
    });
    noticeClosedCheck();
    a(".ql_notice_rem .qlbmibtn_closed").click(function() {
        noticeClosedList[a(this).parents(".ql_notice_rem").attr("attr-notice")] || (noticeClosedList[a(this).parents(".ql_notice_rem").attr("attr-notice")] = (new Date).getTime(),
        localStorage.setItem("noticeClosedList", JSON.stringify(noticeClosedList)))
    });
    if (0 < a(".longqr").length && !isiOS() && !isAndroid())
        for (b = 0; b < a(".longqr").length; b++)
            a(".longqr").eq(b).html(a(".longqr").eq(b).html().replace("\u957f\u6309", "\u626b\u63cf"));
    a(document).on("click", ".toTopBtn", function() {
        function b() {
            a(".toTopBtn").hide()
        }
        0 < a(".main_box_1").length ? a(".main_box_1").animate({
            scrollTop: "0"
        }, 300, b) : 0 < a(".main_box_2").length ? a(".main_box_2").animate({
            scrollTop: "0"
        }, 300, b) : 0 < a(".main_box_3").length ? a(".main_box_3").animate({
            scrollTop: "0"
        }, 300, b) : 0 < a(".main_box_4").length && a(".main_box_4").animate({
            scrollTop: "0"
        }, 300, b)
    });
    a(".main_box_1,.main_box_2,.main_box_3,.main_box_4").scroll(function() {
        distanceScroll = a(this)[0].scrollTop;
        20 < distanceScroll ? a(".toTopBtn").show() : a(".toTopBtn").hide()
    });
    a(".start_bar .s_item").click(function() {
        a(this).addClass("on").siblings(".s_item").removeClass("on");
        var b = a(this).index(".s_item") + 1;
        switch (b) {
        case 1:
            a(".feeback_word").html("\u5b8c\u5168\u672a\u89e3\u51b3");
            break;
        case 2:
            a(".feeback_word").html("\u672a\u89e3\u51b3");
            break;
        case 3:
            a(".feeback_word").html("\u56de\u7b54\u4e00\u822c");
            break;
        case 4:
            a(".feeback_word").html("\u57fa\u672c\u89e3\u51b3");
            break;
        case 5:
            a(".feeback_word").html("\u5f88\u597d");
            break;
        default:
            a(".feeback_word").html("\u5c1a\u672a\u8bc4\u5206")
        }
        a(this).parents(".start_bar").removeClass("sc_1 sc_2 sc_3 sc_4 sc_5").addClass("sc_" + b)
    });
    a(".ticketPush").click(function() {
        a(".pushBox").data("thistopicid", a(this).data("thistopicid"));
        qlSlBoxShow(".pushBox")
    });
    a(document).on("click", ".pushBox .tlbtn_confirm", function() {
        var b = Number(a(".push_span_2 var").html()) - 1
          , c = a(".pushBox").data("thistopicid");
        0 <= b ? (a(".loadingBox").show(),
        a.ajax({
            type: "GET",
            url: "/live/topic/push.htm",
            data: {
                topicId: c
            },
            success: function(c) {
                a(".pushBox").hide();
                a(".loadingBox").hide();
                "200" == c.statusCode ? (a(".push_span_2 var").html(b),
                a(document).minTipsBox({
                    tipsContent: "\u6d88\u606f\u63a8\u9001\u6210\u529f",
                    tipsTime: 1
                })) : "1" == c.statusCode && a(document).minTipsBox({
                    tipsContent: c.msg,
                    tipsTime: 1
                })
            },
            error: function(b) {
                a(document).minTipsBox({
                    tipsContent: b.msg,
                    tipsTime: 1
                });
                a(".loadingBox").hide()
            }
        })) : a(document).minTipsBox({
            tipsContent: "\u63a8\u9001\u6b21\u6570\u5df2\u8fbe\u4e0a\u9650",
            tipsTime: 1
        })
    });
    a(".qlchat-modal .qlchat-modal-bg").click(function() {
        a(this).parents(".qlchat-modal").hide()
    });
    a(document).on("click", ".gifShadow", function() {
        var b = a(this)
          , c = b.next()
          , d = c.attr("src").replace(/@.*/, "");
        c.attr("src", d);
        b.remove()
    });
    a(".auto_height").keydown(function() {
        var b = a(this)
          , c = b.attr("attr-minHeight");
        b.css("height", c + "px");
        b.css("height", b[0].scrollHeight + "px");
        setTimeout(function() {
            var a = b[0].scrollHeight;
            a != c && b.css("height", a + "px")
        }, 5)
    })
});
function convertSecond(a) {
    a = Number(a);
    return 60 >= a ? String(a + "\u2033") : Math.floor(a / 60) + "\u2032" + a % 60 + "\u2033"
}
function convertSize(a) {
    a = Number(a);
    return 1024 > a ? String(a) + "b" : 1048576 > a ? (a / 1024).toFixed(1) + "k" : (a / 1048576).toFixed(1) + "m"
}
function leaveDate(a) {
    return a.replace(/ \d{2}:\d{2}:\d{2}/, "")
}
function leaveTime(a) {
    return a.replace(/\d{4}-\d{2}-\d{2} /, "")
}
;
